home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / ABox 1.9.5 / Header Files / ABUEnvDragMgr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-10-26  |  5.0 KB  |  169 lines  |  [TEXT/MMCC]

  1. /*    
  2.     Copyright © 1991-1995 by TopSoft Inc.  All rights reserved.
  3.  
  4.     You may distribute this file under the terms of the TopSoft
  5.     Artistic License, accompanying this package.
  6.     
  7.     This file was developed by George (ty) Tempel in connection with TopSoft, Inc..
  8.     See the Modification History for more details.
  9.  
  10. Product
  11.     About Box
  12.  
  13. FILE
  14.     ABUEnvDragMgr.h
  15.  
  16. NAME
  17.     ABUEnvDragMgr.h, part of the ABox project source code,
  18.     a utility class, mixed into other classes, responsible for 
  19.     handling the AboutBox DragMgr stuff.
  20.  
  21. DESCRIPTION
  22.     This file contains defines for the about box modules.
  23.     
  24. DEVELOPED BY
  25.     George (ty) Tempel                ttempel@monmouth.com
  26.     All code in this file, and its associated header file was
  27.     Created by George (ty) Tempel in connection with the TopSoft, Inc.
  28.     "FilterTop" application development, except where noted.
  29.  
  30. CARETAKER - George (ty) Tempel <ttempel@monmouth.com>
  31.      Please consult this person for any changes or suggestions to this file.
  32.  
  33. MODIFICATION HISTORY
  34.  
  35.     dd mmm yy    -    xxx    -    patchxx: description of patch
  36.     27 June 94    -    ty    -    Initial Version Created
  37.     20-july-94    -    ty    -    initial version released
  38.     28-july-94    -    ty    -    1.0.6--fixes to watch for Region errors
  39.                                 during drag process
  40.     23-may-95    -    ty    -    changes for compatibility with the CodeWarrior CW6
  41.                             release and the associated Universal Headers from Apple:
  42.                             most methods that returned references now have "Ref" at
  43.                             the end of their methods names to prevent possible collisions
  44.                             with datatypes and classes of the same name (older versions
  45.                             of the compiler didn't have a problem with this).
  46.     25-oct-95    -    ty    -    changes for "const" usage under CW7; simplification of Boolean
  47.                             query methods
  48.  
  49. */
  50.  
  51. /*===========================================================================*/
  52.  
  53. /*========== Exclusion Macros ============*/
  54.  
  55. #pragma    once
  56.  
  57. #ifndef    _ABUEnvDragMgr_
  58. #define    _ABUEnvDragMgr_
  59.  
  60.  
  61. /*============ Header Files ==============*/
  62.  
  63. #include    "ABUEnv.h"
  64.  
  65. #ifndef __DRAG__
  66. #include "Drag.h"
  67. #endif
  68.  
  69. /*=========== External Linkage ===========*/
  70.  
  71. /*================ Macros ================*/
  72.  
  73. /*============== Constants ===============*/
  74.  
  75. #define        kABdefaultClippingType        'TEXT'
  76. #define        kABdefaultClippingCreator    'ttxt'
  77. #define        kABdefaultFlavorFlags        ((long)0)
  78.  
  79. /*================ Enums =================*/
  80.  
  81. /*=============== Structs ================*/
  82.  
  83. /*=============== Typedefs ===============*/
  84.  
  85.  
  86. /*=========== Class Definitions ==========*/
  87.  
  88. class    ABUEnvDragMgr : ABUEnv
  89. {
  90.     public:
  91.                                 ABUEnvDragMgr(void);
  92.         virtual                    ~ABUEnvDragMgr(void);
  93.     
  94.         virtual    Boolean            IsPresent(void);
  95.     
  96.         virtual    OSErr            Initialize(void);
  97.         virtual    OSErr            Begin(void);
  98.         virtual    OSErr            End(void);
  99.         
  100.         //    1.0.6 ty...changed to OSErr OutlineRegion()
  101.         virtual    OSErr            OutlineRegion(void);
  102.         
  103.         virtual OSErr            LocalSendProc(FlavorType theType,
  104.                                         void *dragSendRefCon,
  105.                                         ItemReference theItemRef,
  106.                                         DragReference theDragRef);
  107.  
  108.         static pascal OSErr        SendProc(FlavorType theType,
  109.                                         void *dragSendRefCon,
  110.                                         ItemReference theItemRef,
  111.                                         DragReference theDragRef);
  112.  
  113.         static    OSErr            GetDropLocationDirectory( AEDesc *dropLocation,
  114.                                                             long *directoryID,
  115.                                                             short *volumeID);
  116.                                                     
  117.         virtual    OSErr            MakeDragRegion (void);
  118.         
  119.                                 Boolean IsDragInitialized(void) const { return this->DragInitializedRef() == true; }
  120.  
  121.                                 Boolean HasDrag(void) const { return this->DragRef() != NULL; }
  122.  
  123.                                 Boolean HasDragRegion(void) const { return this->DragRegionRef() != NULL; }
  124.  
  125.                                 Boolean HasDragUPP(void) const { return this->DragUPPRef() != NULL; }
  126.  
  127.                                 Boolean HasDragMgrEvent(void) const { return this->DragMgrEventRef() != NULL; }
  128.                                 
  129.     protected:
  130.         
  131.             Boolean                mDragInitialized;
  132.             DragReference        mDragReference;
  133.             ItemReference        mItemReference;
  134.             RgnHandle            mDragRegion;
  135.             Rect                mDragRect;
  136.             DragSendDataProc    mDragUPP;
  137.             EventRecord*        mDragMgrEvent;
  138.  
  139.             Boolean&                DragInitializedRef(void)         { return this->mDragInitialized; }
  140.             Boolean const&            DragInitializedRef(void) const { return this->mDragInitialized; }
  141.             
  142.             DragReference&            DragRef(void)      { return this->mDragReference; }
  143.             DragReference const&    DragRef(void) const { return this->mDragReference; }
  144.             
  145.             ItemReference&            ItemRef(void)      { return this->mItemReference; }
  146.             ItemReference const&    ItemRef(void) const { return this->mItemReference; }
  147.             
  148.             RgnHandle&                DragRegionRef(void)      { return this->mDragRegion; }
  149.             RgnHandle const&        DragRegionRef(void) const { return this->mDragRegion; }
  150.             
  151.             Rect&                    DragRectRef(void)      { return this->mDragRect; }
  152.             Rect const&                DragRectRef(void) const { return this->mDragRect; }
  153.             
  154.             EventRecord*&            DragMgrEventRef(void)      { return this->mDragMgrEvent; }
  155.             EventRecord* const&        DragMgrEventRef(void) const { return this->mDragMgrEvent; }
  156.             
  157.             DragSendDataProc&        DragUPPRef(void)      { return this->mDragUPP; }
  158.             DragSendDataProc const&    DragUPPRef(void) const { return this->mDragUPP; }
  159.             
  160.     private:
  161.         
  162. };
  163.  
  164.  
  165. /*========== Function Prototypes =========*/
  166.  
  167.  
  168. #endif    // _ABUEnvDragMgr_
  169.